package demo;

/*
 *
 *用于测试
 *
 * */
public class Test {
    public static void main(String[] args) {
        //目标:掌握电影信息的开发.
        //1.每个电影是一个电影对象,首先要设计电影类,用于创建电影对象,封装电影数据
        Movie[] movies = new Movie[5];
        movies[0] = new Movie(1, "热辣滚烫", 46.5, "贾玲");
        movies[1] = new Movie(2, "飞驰人生", 49.9, "沈腾");
        movies[2] = new Movie(3, "非诚勿扰", 9.9, "葛优,舒淇");
        movies[3] = new Movie(4, "第二十条", 87.4, "雷佳音, 赵丽颖");
        movies[4] = new Movie(5, "熊出没", 35.5, "光头强");

        //2.分层思想: 实体类对象负责对数据的存和取,操作类才是业务功能实现的地方
        //创建电影operator类的对象进行操作电影

        //-------专业:把电影对象数据交给电影操作对象进行业务处理
        MovieOperator movieOperator = new MovieOperator(movies);
        movieOperator.showAllMovies();
        movieOperator.getMovieById();

    }
}
